@echo off
ssh 81 bash -c "pwd;docker rm -f gateway;docker rm -f account;docker rm -f auth;docker rm -f order"
ssh 81 bash -c "pwd;mkdir -p /modebing/docker/cloud/oauth/account/"
scp .\Account\target\*.jar 81:/modebing/docker/cloud/oauth/account
scp .\Account\src\main\resources\Dockerfile 81:/modebing/docker/cloud/oauth/account

ssh 81 bash -c "pwd;mkdir -p /modebing/docker/cloud/oauth/order/"
scp .\order\target\*.jar 81:/modebing/docker/cloud/oauth/order
scp .\order\src\main\resources\Dockerfile 81:/modebing/docker/cloud/oauth/order


ssh 81 bash -c "pwd;mkdir -p /modebing/docker/cloud/oauth/auth/"
scp .\security-oauth2-auth\target\*.jar 81:/modebing/docker/cloud/oauth/auth
scp .\security-oauth2-auth\src\main\resources\Dockerfile 81:/modebing/docker/cloud/oauth/auth


ssh 81 bash -c "pwd;mkdir -p /modebing/docker/cloud/oauth/gateway/"
scp .\security-gateway\target\*.jar 81:/modebing/docker/cloud/oauth/gateway
scp .\security-gateway\src\main\resources\Dockerfile 81:/modebing/docker/cloud/oauth/gateway

scp .\docker-compose.yml 81:/modebing/docker/cloud/oauth/docker-compose.yml

ssh 81 bash -c "pwd;docker rmi oauth-gateway:latest oauth-auth:latest oauth-account:latest oauth-order:latest"
ssh 81 bash -c "pwd; cd /modebing/docker/cloud/oauth/; pwd; ls; docker-compose -f docker-compose.yml down; ls; docker-compose -f docker-compose.yml up -d"
